@import 'styles/vars.css';

:root {
  --padding: calc(20 / 32 * 1em);
  --doc-top: calc(12 / 32 * 1em);
}

.down {
  @apply --flex-center;

  height: 3em;
  color: var(--grey-lighter);
}

.down-svg {
  fill: var(--grey-lighter);
  width: 2em;
  height: 2em;
  margin-right: 1em;
}

.list {
  @apply --unstyle-list;

  padding: var(--padding) var(--padding) 0;
  font-size: 1rem;
}

.list-item {
  position: relative;
  margin-left: calc(100 / 32 * 1em);
  padding-bottom: var(--padding);
  padding-left: var(--padding);
  border-left: 1px solid var(--theme);
}

.list-item:last-child {
  padding-bottom: 0;
}

/* 点 */
.list-item::before {
  position: absolute;
  top: var(--doc-top);
  left: 0;
  transform: translateX(-50%);
  display: inline-block;
  content: '';
  width: calc(12 / 32 * 1em);
  height: calc(12 / 32 * 1em);
  border-radius: 50%;
  background-color: var(--theme);
}

/* 遮住第一个列表的点上的边 */
.list-item:first-child::after {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateX(-50%);
  display: inline-block;
  content: '';
  width: var(--doc-top);
  height: var(--doc-top);
  background-color: var(--grey-bg);
}

.time {
  display: inline-block;
  width: 2.5em;
  text-align: center;
  position: absolute;
  top: 0;
  left: -calc(2.5em + var(--padding));
}

.text {
  font-size: calc(28 / 32 * 1em);
  line-height: 1.5;
}

.btns {
  margin-top: calc(10 / 32 * 1em);
  overflow: hidden;
}

.open {
  float: left;
  padding: 0;
  margin: 0;
  border: 0;
  background-color: var(--grey-bg);
  color: lightseagreen;
}

.hidden {
  display: none;
}

.share {
  float: right;
  padding: 0;
  margin: 0;
  border: 0;
  background-color: var(--grey-bg);
}

.svg {
  fill: var(--grey-lighter);
  width: 1.2em;
  height: 1.2em;
}

.modal {
  display: none;
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 6;
}

.modal-active {
  composes: modal;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  animation: fade-in 0.3s forwards;
  opacity: 0;
}

@keyframes fade-in {
  100% {
    opacity: 1;
  }
}

.share-list {
  @apply --unstyle-list;

  display: flex;
  justify-content: space-between;
  padding: calc(30 / 28 * 1em);
  font-size: calc(28 / 32 * 1em);
  background-color: rgba(0, 0, 0, 0.3);
}

.share-link {
  display: block;
}

.share-icon {
  width: calc(120 / 28 * 1em);
  height: calc(120 / 28 * 1em);
  padding: calc(25 / 28 * 1em);
  border-radius: calc(5 / 28 * 1em);
  background-color: #fff;
}

.share-font {
  margin-top: 0.5em;
  text-align: center;
  color: #fff;
}

.share-btn {
  width: 100%;
  line-height: 2.5;
  border: 0;
  background-color: #fff;
}
